package com.ddstation.instrument_disinfect.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ddstation.common.model.InvsCheckCommonSchParModel;
import com.ddstation.common.model.SimpleModel;
import com.ddstation.home_page.model.GroupByYmParMoel;
import com.ddstation.home_page.model.GroupByYmResMoel;
import com.ddstation.instrument_disinfect.model.InstrumentDisinfectDetailParModel;
import com.ddstation.instrument_disinfect.model.InstrumentDisinfectHeadResModel;
import com.ddstation.instrument_disinfect.model.InstrumentDisinfectResModel;

public interface InstrumentDisinfectMapper {
	// 查询机构 设置 or 场地 的消毒记录
	List<InstrumentDisinfectResModel> selectInstrumentDisinfectList(InvsCheckCommonSchParModel _in);
	// 查询明细
	List<InstrumentDisinfectHeadResModel> selectDetail(InstrumentDisinfectDetailParModel _in);
	// App历史记录查询
	List<InstrumentDisinfectHeadResModel> selectByHistory(@Param("institutionId") String institutionId, @Param("instrumentType") Integer instrumentType, @Param("startNo") int startNo, @Param("pageSize") int pageSize);
	// 器械或场所消毒名称查询
	List<SimpleModel> selectByInstrumentName(@Param("institutionId") String institutionId, @Param("instrumentType") Integer instrumentType);
	// 新增器械或场所
	int insertInstrumentName(@Param("institutionId") String institutionId, @Param("instrumentType") Integer instrumentType, @Param("name") String name);
	List<String> checkByInstrumentName(@Param("institutionId") String institutionId, @Param("instrumentType") Integer instrumentType, @Param("name") String name);
	int deleteInstrumentName(@Param("institutionId") String institutionId, @Param("instrumentType") Integer instrumentType, @Param("id") Integer id);

	// 根据 年月，机构ID group[首页按月趋势图查询用]
//	List<GroupByYmResMoel> selectDisinfectListGroupByYearMonth(GroupByYmParMoel a);

	//查询场所消毒记录的id列表 add by zxb 2020.1.3
	String selectAreaIds(InvsCheckCommonSchParModel _in);

	// 根据ID列表查询 add by zxb 2020.1.6 紫外线灯消毒对应
	List<InstrumentDisinfectHeadResModel> selectAreaListByIds(@Param("ids") String[] ids);

}
 